package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * 维修详细表
 */
@Entity
@Table(name = "maintain_detail", schema = "springboot", catalog = "")
public class MaintainDetail {
    private int tainsId;                    //维修详表id
    private Timestamp tainsDate;            //接单时间
    private String tainsClass;              //分类
    private String tainsSection;            //承接部门
    private Integer tainsRepair;            //是否在保
    private String tainsFault;              //故障描述
    private String tainsAlert;              //沟通要点
    private String tainsPerson;             //联系人
    private String tainsPhone;              //电话
    private String tainsStatus;             //接件状况
    private String tainsRemark;             //备注
    private Maintain maintainByTainId;      //维修主表一对多
    private Schedule schedu;                //维修工单进度

    public MaintainDetail() {

    }

    @Id
    @Column(name = "tains_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getTainsId() {
        return tainsId;
    }

    public void setTainsId(int tainsId) {
        this.tainsId = tainsId;
    }

    @Basic
    @Column(name = "tains_date")
    public Timestamp getTainsDate() {
        return tainsDate;
    }

    public void setTainsDate(Timestamp tainsDate) {
        this.tainsDate = tainsDate;
    }

    @Basic
    @Column(name = "tains_class")
    public String getTainsClass() {
        return tainsClass;
    }

    public void setTainsClass(String tainsClass) {
        this.tainsClass = tainsClass;
    }

    @Basic
    @Column(name = "tains_section")
    public String getTainsSection() {
        return tainsSection;
    }

    public void setTainsSection(String tainsSection) {
        this.tainsSection = tainsSection;
    }

    @Basic
    @Column(name = "tains_repair")
    public Integer getTainsRepair() {
        return tainsRepair;
    }

    public void setTainsRepair(Integer tainsRepair) {
        this.tainsRepair = tainsRepair;
    }

    @Basic
    @Column(name = "tains_fault")
    public String getTainsFault() {
        return tainsFault;
    }

    public void setTainsFault(String tainsFault) {
        this.tainsFault = tainsFault;
    }

    @Basic
    @Column(name = "tains_alert")
    public String getTainsAlert() {
        return tainsAlert;
    }

    public void setTainsAlert(String tainsAlert) {
        this.tainsAlert = tainsAlert;
    }

    @Basic
    @Column(name = "tains_person")
    public String getTainsPerson() {
        return tainsPerson;
    }

    public void setTainsPerson(String tainsPerson) {
        this.tainsPerson = tainsPerson;
    }

    @Basic
    @Column(name = "tains_phone")
    public String getTainsPhone() {
        return tainsPhone;
    }

    public void setTainsPhone(String tainsPhone) {
        this.tainsPhone = tainsPhone;
    }

    @Basic
    @Column(name = "tains_status")
    public String getTainsStatus() {
        return tainsStatus;
    }

    public void setTainsStatus(String tainsStatus) {
        this.tainsStatus = tainsStatus;
    }

    @Basic
    @Column(name = "tains_remark")
    public String getTainsRemark() {
        return tainsRemark;
    }

    public void setTainsRemark(String tainsRemark) {
        this.tainsRemark = tainsRemark;
    }

    @ManyToOne
    @JoinColumn(name = "tain_id", referencedColumnName = "tain_id")
    public Maintain getMaintainByTainId() {
        return maintainByTainId;
    }

    public void setMaintainByTainId(Maintain maintainByTainId) {
        this.maintainByTainId = maintainByTainId;
    }

    @ManyToOne
    @JoinColumn(name = "state_id", referencedColumnName = "state_id")
    public Schedule getSchedu() {
        return schedu;
    }

    public void setSchedu(Schedule schedu) {
        this.schedu = schedu;
    }

}
